﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CompanyManagement.usercontrol
{
    public partial class UcProfile : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user"] == null || string.IsNullOrEmpty(Session["user"].ToString()))
            {
                Response.Redirect("~/Login.aspx");
            }
            if (!IsPostBack)
            {
                lblUser.Text = Session["user"].ToString();
            }
        }

        protected void lbtnLogout_Click(object sender, EventArgs e)
        {
            Session["user"] = null;
            Session["usertype"] = null;
            Response.Redirect("~/Login.aspx");
        }

        protected void lbtnChangePass_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/admin/ChangePass.aspx");
        }
    }
}